package com.greedy.bulls.stock.user.service;

import com.greedy.bulls.stock.common.exception.ComponentException;
import com.greedy.bulls.stock.entity.user.TradeUserFile;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: Yanxy
 * @Date: Created in:2023/08/05
 * Description:
 */
public interface IStockUserFileService {

    /**
     * 上传用户身份证
     *
     * @param userId 用户ID
     * @param file   文件
     * @return 文件路径
     * @throws Exception 异常
     */
    String uploadUserIdCard(Long userId, MultipartFile file) throws Exception;

    /**
     * 根据文件ID查找文件对象
     * @param fileId 文件ID
     * @return 文件对象
     */
    TradeUserFile getTradeUserFile(String fileId) throws ComponentException;
}
